<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>隔行变色</title>
</head>
<style>
    /*E F:nth-child(n)	选择父级元素E的第n个子元素F，（n可以是1、2、3），关键字为even:偶数行变色、odd：奇数行变色*/
    table tr:nth-child(1) {
        background: pink;
    }
</style>
<body>
<table border="1">
    <tr>
        <td>1</td>
        <td>1</td>
        <td>1</td>
    </tr>
    <tr>
        <td>2</td>
        <td>2</td>
        <td>2</td>
    </tr>
    <tr>
        <td>3</td>
        <td>3</td>
        <td>3</td>
    </tr>
    <tr>
        <td>4</td>
        <td>4</td>
        <td>4</td>
    </tr>
    <tr>
        <td>5</td>
        <td>5</td>
        <td>5</td>
    </tr>
</table>
</body>
</html>